#ifndef __baker_Light_h__
#define __baker_Light_h__

#include "Prerequire.h"

#include "Vector.h"

namespace baker
{
    /** The interface of Light sources
    */
    class ILight
    {
    public:

        ILight( void ) {}

        virtual ~ILight( void ) {}

        /** Set a parameter to this light.
        */
        virtual void setParam( guint id
                             , const Vec3 & val
                             ) = 0;
    };

    /** A Light source
    */
    class Light : public ILight
    {
    public:
        /** Constructor
        */
        Light( void );

        /** Destructor
        */
        virtual ~Light( void );

        /** Implementating ILight
        */
        virtual void setParam( guint id
                             , const Vec3 & val
                             );

        /** Set the position of this light
        */
        Light & setPos( real x
                      , real y
                      , real z
                      );

        /** Get the position of the light
        */
        Vec3 getPos() const;

        /** Set the direction of this light
        */
        Light & setDir( real x
                      , real y
                      , real z
                      );

        /** Get the direction of this light
        */
        Vec3 getDir() const;

        /** Set the color of this light
        */
        Light & setColor( real r
                        , real g
                        , real b
                        );

        /** Get the color of this light
        */
        Vec3 getColor() const;

        /** Set the cast-shadows propertry of this light
        */
        Light & setCastShadows( gboolean castShadows );

        /** Get the cast-shadows propertry of this light
        */
        gboolean getCastShadows() const;

    private:
        Vec3        mPos;
        Vec3        mDir;
        Vec3        mColor;
        gboolean    mCastShadows;
    };
}

#endif  // __baker_Light_h__
